<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title> - 模板详情</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" th:href="@{favicon.ico}">
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/css/font-awesome.css}" rel="stylesheet">

    <link rel="stylesheet" th:href="@{/css/animate.css}" >
    <link  rel="stylesheet" th:href="@{/css/style.css}">

</head>


<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
                    <div class="row">
                        <div class="col-sm-12">
                            <div class="ibox float-e-margins">
                                <div class="ibox-title">
                                    <h5>流行病调查模板 <small th:text="${template.getTemplate().getTemplateName()}"></small></h5>
                                </div>

                                <div class="ibox-content">
                                    <form method="get" class="form-horizontal">
                                        <div th:each="i:${template.getQuestions()}" th:switch="${i.getQuestion().getQuestionType()}">

                                            <span th:case="0">
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label"><p th:text="${i.getQuestion().getQuestionName()}"></p>
                                                    <small class="text-navy">单选</small>
                                                </label>

                                                <div class="col-sm-9">
                                                    <br/>
                                                    <label class="radio-inline" th:each="j:${i.getOptions()}">
                                                        <input type="radio" th:name="${i.getQuestion().getQuestionName()}" th:text="${j.getOptionValue()}"></label>
                                                    <!--同一个name下是一组radio-->
                                                </div>
                                            </div>
                                            </span>

                                            <span th:case="1">
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label"><p th:text="${i.getQuestion().getQuestionName()}"></p>
                                                    <small class="text-navy">多选</small>
                                                </label>

                                                <div class="col-sm-9">
                                                    <br/>
                                                    <label class="checkbox-inline" th:each="j:${i.getOptions()}">
                                                        <input type="checkbox" th:text="${j.getOptionValue()}" ></label>
                                                </div>
                                            </div>
                                            </span>

                                            <span th:case="2">
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label"><p th:text="${i.getQuestion().getQuestionName()}"></p>
                                                    <small class="text-navy">填空</small>
                                                </label>

                                                <div class="col-sm-9">
                                                    <br/>
                                                    <input type="text" class="form-control">
                                                </div>
                                            </div>
                                            </span>

                                            <div class="hr-line-dashed"></div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>

    <div class="row">
        <center>
            <a class="btn btn-primary btn-rounded" href="/template/all">返回</a>
        </center>
    </div>
                </div>



<!-- 自定义js -->
<script th:src="@{js/content.js}"></script>


</body>

</html>
